package shyvana;

public class Card {
	private static final String[] COLOR_NAMES = {"pik","kier","karo","trefl"};
	private static final String[] CARD_NAMES = {"2","3","4","5","6","7","8","9","10","J","Q","K","A"};
	private final int n;
	public Card(int value, int color){
		this.n = value + (color<<4);
	}
	@Override
	public String toString(){
		return CARD_NAMES[n&0xF] + " " + COLOR_NAMES[n>>4];
	}
	public int getCardValue(){
		return n&0xF;
	}
	public int getCardColor(){
		return n>>4;
	}
	public int getRaw(){
		return n;
	}
}
